const fs = require('fs')
const package = require('./package.json')
const { join } = require('path')

const html = fs.readFileSync(join(__dirname, './index.html'))

fs.writeFileSync(join(__dirname, 'dist_electron', 'index.html'), html, 'utf8')
const json = {
    "name": package.name,
    "version": package.version,
    "description": package.description,
    "main": "dist/index.js",
    "author": package.author,
    "license": package.license,
    "homepage": package.homepage,
}

fs.writeFileSync(join(__dirname, 'dist_electron', 'package.json'), JSON.stringify(json), 'utf8')

